package com.young.weixin.model.wxrpc.response;

/**
 * 微信接口返回结果基类
 *
 * @author wangjiyu
 * @date 2021/10/5 13:18
 */
public class WxBaseResponse {
    /**
     * 错误码
     */
    private Long errcode;
    /**
     * 信息
     */
    private String errmsg;

    /**
     * 返回请求是否成功
     * @return
     */
    public boolean isSuccess() {
        return errcode == null || errcode.intValue() == 0;
    }

    public Long getErrcode() {
        return errcode;
    }

    public void setErrcode(Long errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }
}
